var docLayer = new Zondy.Map.Doc('', '城市', {
    ip: 'localhost',
    port: 6163,
    // 加上跨域参数才可以下载
    crossOrigin: "Anonymous"
})
const map = new ol.Map({
    target: 'map',
    layers: [gaodeMapLayer, docLayer],
    view: new ol.View({
        center: [114, 30],
        zoom: 8,
        projection: "EPSG:4326"
    })
})
/* 地图的下载 */
document.getElementById('download').addEventListener('click', function () {
    console.log("下载")
    map.once('postcompose', function (event) {
        var canvas = event.context.canvas;
        canvas.toBlob(function (blob) {
            saveAs(blob, 'map.png');
        });
    });
    map.renderSync();
});